package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Sign;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface SignMapper {

    int insert(Sign record);

    Sign selectByPrimaryKey(Long id);

    List<Sign> selectAll();

    List<Sign> selectByUser(@Param("userId") Long userId, @Param("date") Date date);

    Integer selectCountBySignDate(@Param("date") Date date, @Param("userId") Long userId);

    void insertPoints(@Param("userId") Long userId, @Param("points") Integer points);

    void updatePoints(@Param("userId") Long userId, @Param("points") Integer points);

    Integer selectPointsByUserId(@Param("userId") Long userId);
}